#pragma once

#include "d3d9.h"
#include "d3dx9.h"
#include "SpriteManager.h"
#include "DirectInput.h"
#include "Sound.h"

// Add pragma comments so we do not have to change
// the project dependencies
#pragma comment (lib, "d3d9.lib")
#pragma comment (lib, "d3dx9.lib")

class InGameMenu
{
private:
	// Singleton instance
	static InGameMenu*	m_InGameMenuInstance;

	// Pointer to SpriteManager
	SpriteManager*		m_pSpriteManager;

	// Sprite pointer
	ID3DXSprite*		m_pInGameMenu;
	
	// Sprites for ingame menu
	short sMenuTitle;
	short sResumeGame;
	short sQuitToMainMenu;
	short sInGameInstructions;
	short sResetGame;
	short sInstructionScreen;
	short sBackButton;
	short sSpriteIndex;

	// Menu & Game state
	short sMenuState;
	enum eMenuState{PAUSED, INSTRUCTIONS};
	int iGameState;

	// Paused bool
	bool bPaused;

	//creat sound object
	Sound* m_pSound;

public:
	InGameMenu(void);
	~InGameMenu(void);

	// Singleton functions
	static InGameMenu* GetInstance(void);
	void LoadPauseMenu(void);
	void DeleteInGameMenuInstance(void);
	void InitInGameMenu(IDirect3DDevice9* m_pD3DDevice);
	void Update(HWND hWnd, DirectInput* m_pDirectInput);
	void Render(IDirect3DDevice9* m_pD3DDevice);
	void ResetInGameMenu(void);
	int GetStateIGMenu(void);
	bool GetPaused(void);

	// Shutdown
	void DestroyIGMenu(void);
};